package com.alan.product.issue.controller;

import com.alan.product.issue.entity.ItemInventory;
import com.alan.product.issue.service.InventoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("inventory")
public class InventoryController {

    @Autowired
    private InventoryService inventoryService;

    @PostMapping("batchLock")
    public String batchLock(@RequestBody List<ItemInventory> list) {
        inventoryService.lock(list);
        return "success";
    }
}
